<template>
  <div>
    <el-dialog title="导出数据" :visible.sync="dialogVisble" :before-close="handleClose" :close-on-click-modal=false
               width="30%">
      <el-form :model="form" label-position="left" label-width="80px" ref="form">
        <el-form-item label="类型">
          <el-radio-group v-model="form.type">
            <el-radio label="0">{{dbType}}</el-radio>
            <el-radio label="1">execl</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="数量" prop="number">
          <el-input-number v-model="form.number" :min="1" :max="1000" label="描述文字"></el-input-number>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="save()">确 定</el-button>
      </div>
    </el-dialog>
  </div>

</template>

<script>
export default {
  name: "cuDialog",
  props: ["dialogVisble"],
  data() {
    return {
      dbType:"",
      form: {
        "number": 1,
        type: "0"
      }
    }
  },
  mounted() {
    this.form = {
      "number": 1,
      type: "0"
    }
    this.dbType = JSON.parse(sessionStorage.getItem("dbInfo")).dbType
  },
  methods: {
    handleClose() {
      this.$emit("closeDialog")
    },
    save() {
      this.$emit("importData",this.form)
      this.$emit("closeDialog")
    }
  }
}
</script>

<style scoped>

</style>
